package com.ypf;

public class Animal {
    private final String name;

    // 构造函数
    public Animal(String name) {
        System.out.println("创建Animal对象: " + name);
        this.name = name;
    }

    // 实例方法
    public void eat(String name) {
        System.out.println(this.name + " eat " + name);
    }

    // 静态方法
    public static void run() {
        System.out.println("animal run...");
    }

}
